<?php

namespace app\common\validate;

use think\Validate;

class Address extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'page|页码'                   => 'require',
        'pageCount|页面数量'            => 'require',
        'mobile|手机号'                => 'require',
        'captcha|验证码'               => 'require',
        'passWord|密码'               => 'require',
        'confirmPassWord|确认密码'      => 'require',
        'realName|真实姓名'             => 'require',
        'job|职位'                    => 'require',
        'idCard|身份证号'               => 'require',
        'sex|性别'                    => 'require',
        'avatar|头像'                 => 'require',
        'noticeId|消息编号'             => 'require',
        'content|投诉内容'              => 'require',
        'loginType|登录场景'            => 'require|in:1',
        'miniappLoginCode|微信Code'   => 'require',
        'miniappMobileCode|手机号Code' => 'require',
        'name|联系人'                  => 'require',
        'address|省市县'               => 'require',
        'addressDetail|详细地址'        => 'require',
        'addressId|地址Id'            => 'require',
        'province|省'                => 'require',
        'city|市'                    => 'require',
        'county|县/区'                => 'require',
        'schoolName|学校名'            => 'require',
        'grade|年级'                  => 'require',
        'class|班级'                  => 'require',
        'schoolAddressId|学校地址ID'    => 'require',
        'keyWrods|关键词'              => 'require',
        'photoAddressId|拍摄地址ID'    => 'require',

    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'getOrderPageList' => ['page', 'pageCount'],
        'addOrderAddress'  => ['name', 'mobile', 'address', 'addressDetail', 'captcha'],
        'updOrderAddress'  => ['name', 'mobile', 'address', 'addressDetail', 'addressId'],
        'delOrderAddress'  => ['addressId'],
        'getSchoolList'    => ['page', 'pageCount'],
        'addSchoolAddress' => ['province', 'city', 'county', 'schoolName', 'grade', 'class'],
        'updSchoolAddress' => ['province', 'city', 'county', 'schoolName', 'grade', 'class', 'schoolAddressId'],
        'delSchoolAddress' => ['schoolAddressId'],
        'schoolList'       => ['page', 'pageCount', 'keyWords'],
        'addPhotoAddress'  => ['name', 'mobile', 'province','city','county','addressDetail'],
        'updPhotoAddress'  => ['name', 'mobile', 'province','city','county','addressDetail','photoAddressId'],
        'getPhotoList'     => ['page','pageCount'],
        'delPhotoAddress'  => ['photoAddressId'],
    ];
}